We need to fix the latter to return a byte array, which gjs doesn't
deal with well right now.
https://bugzilla.gnome.org/show_bug.cgi?id=649981
if (!GLib.file_test(this._bookmarksPath, GLib.FileTest.EXISTS))
return;
- let [success, bookmarksContent, len] = GLib.file_get_contents(this._bookmarksPath);
-
- if (!success)
- return;
+ let bookmarksContent = Shell.get_file_contents_utf8_sync(this._bookmarksPath);
let bookmarks = bookmarksContent.split('\n');
if (dimShader === null)
return null;
if (!dimShader) {
- let [success, source, length] = GLib.file_get_contents(global.datadir +
- '/shaders/dim-window.glsl');
+ let source = Shell.get_file_contents_utf8_sync(global.datadir + '/shaders/dim-window.glsl');
try {
let shader = new Clutter.Shader();
shader.set_fragment_source(source, -1);